Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy from tagged contract version #312

Closed
wants to merge 3 commits into from
Closed

Conversation

anna-carroll
Copy link
Member

Motivation

Deploy repo was deploying from workspace version of the contracts, not tagged npm version. This didn't affect the source code deploys as we had frozen the contract code, but needs to be changed nevertheless.

Solution

Update deploy package to use tagged contract versions rather than workspace.

PR Checklist

  • Added Tests
  • Updated Documentation
  • Updated CHANGELOG.md for the appropriate package

@anna-carroll anna-carroll self-assigned this May 26, 2022
@anna-carroll anna-carroll requested review from a team as code owners May 26, 2022 20:17
@Imti
Copy link
Contributor

Imti commented May 26, 2022

When do we need to bump the contract versions in deploy? For every time the contracts change or whenever we wanna deploy? I'm wary of using the versions in a yarn workspace since it makes local development harder, but wanna understand more first.

@anna-carroll
Copy link
Member Author

anna-carroll commented May 26, 2022

When do we need to bump the contract versions in deploy? For every time the contracts change or whenever we wanna deploy?

we need to bump the contract versions when we release a new tagged version of the contracts, which will happen each time we perform a protocol sprint + audit + on-chain upgrade. this will be approx every 6-8 weeks.

right now, if we make protocol changes during a protocol sprint, then deploy a new chain, the contracts on the new chain will be un-audited & inconsistent with the other chains' contracts

@odyslam
Copy link
Contributor

odyslam commented May 27, 2022

Instead of hardcoding it in the package.json, could the deployment script fetch the latest npm versions from the npm registry?

@prestwich
Copy link
Member

putting it in the package.json will also cause problems when we want to deploy test contracts that aren't tagged on EVM. e.g. testing in local env?

running into rough edges on to my understanding of JS packaging

@prestwich
Copy link
Member

@anna-carroll because we may need to run deployments from commits older than this, you'll need to add "check the version" to your list of manual deploy pre-flight checks 😓

@anna-carroll
Copy link
Member Author

anna-carroll commented May 31, 2022

because we may need to run deployments from commits older than this

the catch is that the deploy script itself needs to be in sync with the version of the contracts it's deploying.
changes to contract interface affect deploy 😓

i we're deploying workspace^ contracts, then also workspace^ deploy script.
else, need tagged contract version + tagged deploy script..

@anna-carroll
Copy link
Member Author

Okay I have created a ticket where we should discuss this: #325

Closing PR until we have aligned on an approach

@prestwich
Copy link
Member

i we're deploying workspace^ contracts, then also workspace^ deploy script. else, need tagged contract version + tagged deploy script..

ya, for any given commit, CI should guarantee that the version of deploy in that commit is compatible with its dependency. So when we tag a contract release, we need to bump the deploy script dependency version. If we always do that correctly, we should keep things in sync I guess? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants